#include <iostream>
using namespace std;
const int N = 200005;
int t, n, a[N];
long long sum;
int main()
{
    freopen("color.in", "r", stdin);
    freopen("color.out", "w", stdout);
    cin >> t;
    while (t --)
    {
        sum = 0;
        cin >> n;
        for (int i = 1; i <= n; i ++)
        {
            cin >> a[i];
            sum += a[i];
        }
        cout << sum << '\n';
    }
    return 0;
}
